SQL Language Extended Support

You can use SQL scripts to perform actions such as getting the USER ID and the program name.

If you are using an Oracle or SQL Server database, you can use the following:

  • SET statements
  • DESCRIBE
  • TRUNCATE TABLE

Examples

The following examples illustrate some of the actions that can be performed with a SQL script.

Example Description
1 Use this example to get the USER ID.
SET vpcUSER = %U; 
			 
2 Use this example to get the project name.
SET vpcProgram = %P; 
			 

If the project is open, this will pick up the project name; otherwise, it will set the name to the parameter passed '%P'. Whether or not this is suitable depends on what your script is trying to do.

3 This example prompts you for the name of the breakdown structure and extracts the code and code description for that breakdown structure.
SET vpcBDNFile=(inputbox('Breakdown Structure File Name:')); 		 
SELECT CODE,CODEDESC FROM BDNDETL WHERE BREAKFILE=?vpcBDNfILE;